import { createRouter, createWebHashHistory } from 'vue-router';
import type { Router, RouteRecordRaw } from 'vue-router';

//构建路由配置
export const routes : Array<RouteRecordRaw> = [
	{
		path: '/login',
		name: '星火进销存登录',
		component: () => import('../views/login/login.vue')
	},
	// 公司管理
	{
		path: '/f-business',
		name: '经营看板',
		component: () => import('../views/firmManage/f-business.vue')
	},
	{
		path: '/f-products',
		name: '产品追踪',
		component: () => import('../views/firmManage/f-products.vue')
	},
	{
		path: '/f-client',
		name: '客户分析',
		component: () => import('../views/firmManage/f-client.vue')
	},
	//库存管理
	{
		path: '/i-workbench',
		name: '库管工作台',
		component: () => import('../views/inventoryManage/i-workbench.vue')
	}, {
		path: '/i-commodity',
		name: '商品及库存看板',
		component: () => import('../views/inventoryManage/i-commodity.vue')
	}, {
		path: '/i-transceiver',
		name: '收发存放表',
		component: () => import('../views/inventoryManage/i-transceiver.vue')
	}, {
		path: '/i-inventory',
		name: '库存盘点表',
		component: () => import('../views/inventoryManage/i-inventory.vue')
	}, {
		path: '/i-warehouse',
		name: '仓库信息',
		component: () => import('../views/inventoryManage/i-warehouse.vue')
	},
	//销售管理
	{
		path: '/s-sale',
		name: '销售工作台',
		component: () => import('../views/saleManage/s-sale.vue')
	}, {
		path: '/s-sale-d',
		name: '销售订单',
		component: () => import('../views/saleManage/s-sale-d.vue')
	}, {
		path: '/s-sale-d-g',
		name: '销售订单跟踪',
		component: () => import('../views/saleManage/s-sale-d-g.vue')
	}, {
		path: '/s-sale-p',
		name: '销售排行',
		component: () => import('../views/saleManage/s-sale-p.vue')
	}, {
		path: '/s-commodity',
		name: '商品看板',
		component: () => import('../views/saleManage/s-commodity.vue')
	},
	//采购管理
	{
		path: '/p-procurement',
		name: '采购工作台',
		component: () => import('../views/procurementManage/p-procurement.vue')
	}, {
		path: '/p-vendor',
		name: '供应商信息',
		component: () => import('../views/procurementManage/p-vendor.vue')
	},
	// {
	// 	path: '/p-procurement-d',
	// 	name: '采购订单',
	// 	component: () => import('../views/procurementManage/p-procurement-d.vue')
	// }, 
	{
		path: '/p-procurement-d-g',
		name: '采购订单跟踪',
		component: () => import('../views/procurementManage/p-procurement-d-g.vue')
	},
	// {
	// 	path: '/p-procurement-x',
	// 	name: '采购需求',
	// 	component: () => import('../views/procurementManage/p-procurement-x.vue')
	// },
	//财务管理
	{
		path: '/f-finance',
		name: '财务看板',
		component: () => import('../views/financeManage/f-finance.vue')
	}, {
		path: '/f-collection',
		name: '收款单',
		component: () => import('../views/financeManage/f-collection.vue')
	}, {
		path: '/f-collection-h',
		name: '收款核销',
		component: () => import('../views/financeManage/f-collection-h.vue')
	}, {
		path: '/f-payment',
		name: '付款单',
		component: () => import('../views/financeManage/f-payment.vue')
	}, {
		path: '/f-payment-h',
		name: '付款核销',
		component: () => import('../views/financeManage/f-payment-h.vue')
	},
	//发票管理
	{
		path: '/i-output',
		name: '销项发票',
		component: () => import('../views/invoiceManage/i-output.vue')
	}, {
		path: '/i-input',
		name: '进项发票',
		component: () => import('../views/invoiceManage/i-input.vue')
	},
	//对账管理
	{
		path: '/r-treat-reconciliation',
		name: '待对账客户',
		component: () => import('../views/reconciliationManage/r-treat-reconciliation.vue')
	}, {
		path: '/r-treat-reconciliation-g',
		name: '待对账供应商',
		component: () => import('../views/reconciliationManage/r-treat-reconciliation-g.vue')
	}, 
	// {
	// 	path: '/r-client',
	// 	name: '客户对账单',
	// 	component: () => import('../views/reconciliationManage/r-client.vue')
	// },
	// {
	// 	path: '/r-vendor',
	// 	name: '供应商对账单',
	// 	component: () => import('../views/reconciliationManage/r-vendor.vue')
	// },
	//客户管理
	{
		path: '/s-client',
		name: '客户信息',
		component: () => import('../views/customerManage/s-client.vue')
	},
	{
		path: '/s-client-g',
		name: '客户跟进',
		component: () => import('../views/customerManage/s-client-g.vue')
	},
	//销售订单
	{
		path: '/ordersInfo',
		name: '订单信息',
		component: () => import('../views/saleOrders/ordersInfo.vue')
	}, {
		path: '/ordersDetail',
		name: '订单明细',
		component: () => import('../views/saleOrders/ordersDetail.vue')
	},
	//销售发货
	{
		path: '/shipmentSingle',
		name: '发货单',
		component: () => import('../views/saleShipments/shipmentSingle.vue')
	}, {
		path: '/shipmentDetail',
		name: '发货明细',
		component: () => import('../views/saleShipments/shipmentDetail.vue')
	},
	//销售退货
	{
		path: '/returnOrder',
		name: '退货单',
		component: () => import('../views/saleReturn/returnOrder.vue')
	}, {
		path: '/returnOrderDetail',
		name: '退货明细',
		component: () => import('../views/saleReturn/returnOrderDetail.vue')
	},
	//采购管理
	{
		path: '/procurementDemand',
		name: '采购需求',
		component: () => import('../views/procurementManageB/procurementDemand.vue')
	}, {
		path: '/procurementOrders',
		name: '采购订单',
		component: () => import('../views/procurementManageB/procurementOrders.vue')
	}, {
		path: '/procurementDetail',
		name: '采购明细',
		component: () => import('../views/procurementManageB/procurementDetail.vue')
	}, {
		path: '/vendorManage',
		name: '供应商管理',
		component: () => import('../views/procurementManageB/vendorManage.vue')
	},
	//采购到货
	{
		path: '/procurementList',
		name: '采购到货单',
		component: () => import('../views/procurementArrives/procurementList.vue')
	}, {
		path: '/receiptDetail',   
		name: '采购到货明细',
		component: () => import('../views/procurementArrives/receiptDetail.vue')
	},
	//库存管理
	{
		path: '/inventoryTable',
		name: '库存表',
		component: () => import('../views/inventoryManageB/inventoryTable.vue')
	}, { 
		path: '/inventoryInventory',
		name: '库存盘点',
		component: () => import('../views/inventoryManageB/inventoryInventory.vue')
	},
	//出入库管理
	{
		path: '/outboundOrder',
		name: '出库单',
		component: () => import('../views/gooutEnterStorehouseManage/outboundOrder.vue')
	}, {
		path: '/outboundDetail',
		name: '出库明细',
		component: () => import('../views/gooutEnterStorehouseManage/outboundDetail.vue')
	},
	{
		path: '/storageOrder',
		name: '入库单',
		component: () => import('../views/gooutEnterStorehouseManage/storageOrder.vue')
	}, {
		path: '/storageDetail',
		name: '入库明细',
		component: () => import('../views/gooutEnterStorehouseManage/storageDetail.vue')
	},
	//对账管理
	{
		path: '/receivableDetail',
		name: '应收/应付明细',
		component: () => import('../views/reconciliationManageB/receivableDetail.vue')
	},
	{
		path: '/clientReconciliationOrder',
		name: '客户对账单',
		component: () => import('../views/reconciliationManageB/clientReconciliationOrder.vue')
	},
	{
		path: '/clientReconciliationDetail',
		name: '客户对账明细',
		component: () => import('../views/reconciliationManageB/clientReconciliationDetail.vue')
	},
	{
		path: '/vendorReconciliationOrder',
		name: '供应商对账单',
		component: () => import('../views/reconciliationManageB/vendorReconciliationOrder.vue')
	},
	{
		path: '/vendorReconciliationDetail',
		name: '供应商对账明细',
		component: () => import('../views/reconciliationManageB/vendorReconciliationDetail.vue')
	},
	//收支管理
	{
		path: '/purchasePayments', 
		name: '采购付款',
		component: () => import('../views/shouzhiManage/purchasePayments.vue')
	},
	{
		path: '/salesCollections',
		name: '销售收款',
		component: () => import('../views/shouzhiManage/salesCollections.vue')
	}
];

//创建路由实例
const router : Router = createRouter({
	history: createWebHashHistory(),
	routes
});
export default router;